package com.qf.feign;

import com.qf.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 汤奇
 * @version V1.0
 * @Project BookPro
 * @Package com.qf.feign
 * @Description:
 * @Date 2022/7/6 20:06
 */
//指定被调用方微服务的服务名
@FeignClient(name = "QF-SEARCH",fallback = SearchFeignFallBack.class)
@RestController
@RequestMapping("/search")
public interface SearchFeign {

    @RequestMapping("/test")
    public String test();

    @RequestMapping("/query/{id}")
    public User findUserById(@PathVariable("id") Integer id);
}
